package org.bbs.demo.topic.dao;

import org.apache.ibatis.annotations.Delete;
import org.apache.ibatis.annotations.Insert;
import org.apache.ibatis.annotations.Mapper;
import org.apache.ibatis.annotations.Update;

@Mapper
public interface CancelLikes {
    @Update("update bbstopic set t_likes = t_likes - 1 where topic_id = #{topic_id}")
    public int updateCancelLike(String topic_id);

    @Delete("delete from user_text_likes where user_id = #{user_id} and topic_id = #{topic_id}")
    public int cancelLike(String user_id, String topic_id);

    //点赞，sexy+3
    @Update("update bbstopic set sexy = sexy - 3 where topic_id = #{topic_id}")
    public int reduceSexy(String topic_id);
}
